package org.jeecg.modules.icms.invoice.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.poi.ss.usermodel.Sheet;
import org.jeecg.modules.icms.customs.entity.IcmsCustomsDetail;
import org.jeecg.modules.icms.invoice.dto.IcmsInvoiceDetailDto;
import org.jeecg.modules.icms.invoice.entity.IcmsInvoiceDetail;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.icms.invoice.entity.IcmsInvoiceHeader;
import org.jeecg.modules.icms.invoice.vo.IcmsInvoiceDetailVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @Description: 发票行表
 * @Author: jeecg-boot
 * @Date:   2024-01-10
 * @Version: V1.0
 */
public interface IIcmsInvoiceDetailService extends IService<IcmsInvoiceDetail> {

    /**
     * 导入开票行信息
     * @param sheet sheet表
     * @param icmsInvoiceDetail 导入的excel中非空行数据
     * @param invoiceRemarkRows 开票备注所在行
     * @param icmsInvoiceHeaderList 所有的开票头
     * @return
     */
    void addDetailInfo(Sheet sheet, List<IcmsInvoiceDetailDto> icmsInvoiceDetail, List<Integer> invoiceRemarkRows, List<IcmsInvoiceHeader> icmsInvoiceHeaderList);

    /**
     * 开票行条件查询
     * @param icmsInvoiceDetailVo
     * @param pageNo
     * @param pageSize
     * @param req
     * @return
     */
    IPage<IcmsInvoiceDetailVo> queryAll(IcmsInvoiceDetailVo icmsInvoiceDetailVo, Integer pageNo, Integer pageSize, HttpServletRequest req);

    /**
     * 根据合同号，查询出合同号对应的件号，数量等信息
     * @param contractNo 合同号
     * @return
     */
    Map<String, IcmsInvoiceDetail> queryInvoiceDetailInfoByContract(String contractNo);
}
